package com.hnevc.sharerestuarnt;

import java.util.ArrayList;
public class CookRestaurant {
	private String name;
	private ArrayList dishes = new ArrayList<>();
	public CookRestaurant(String name) {
		this.name =name;
	}
	
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public ArrayList<Dish> getDishes(){
		return dishes;
	};
	public void cookDish(Dish dish){
		System.out.println("餐饮单位："+name+"正在制作："+dish.getName());
	};
	public void sendDish(Dish dish){
		System.out.println("餐饮单位："+name+"正在配送："+dish.getName());
	};
	public void addDish(Dish dish){
		dishes.add(dish);
	}
	public void removeDish(Dish dish){
		dishes.remove(dish);
	}
	public Dish getDish(int index){
		return (Dish)(dishes.get(index));
				
	}
	@Override
	public String toString() {
		// TODO Auto-generated method stub
		return name+"\t";
	}
}
